[Table of Contents] [docx version]

VML Reference Material - VML

VML - SpreadsheetML Drawing

It is possible to attach user interface controls, such as comments, combo boxes (dropdowns) and embedded controls, to a SpreadsheetML document. VML is used to define certain aspects of the control, such as size and visual appearance. Additional information describing the control must also be included. The VML SpreadsheetML Drawing namespace provides the additional information necessary to define the type, settings and behavior of the control.

[Note: The VML format is a legacy format originally introduced with Office 2000 and is included and fully defined in this Standard for backwards compatibility reasons. The DrawingML format is a newer and richer format created with the goal of eventually replacing any uses of VML in the Office Open XML formats. VML should be considered a deprecated format included in Office Open XML for legacy reasons only and new applications that need a file format for drawings are strongly encouraged to use preferentially DrawingML .end note]

[Example: Assume the comment below exists on a spreadsheet:

The following defines the additional information necessary to describe the comment. The ObjectType attribute describes the object as a comment. The Anchor element defines that its edges are anchored to the first and fourth rows and the second and fourth columns. The Row and Column elements indicate that it points to the cell in the first row, first column.

<x:ClientData ObjectType="Note">
<x:MoveWithCells/>
<x:SizeWithCells/>
<x:Anchor>1, 13, 0, 12, 2, 52, 2, 10</x:Anchor>
<x:AutoFill>False</x:AutoFill>
<x:Row>0</x:Row>
<x:Column>0</x:Column>
<x:Visible/>
</x:ClientData>

This additional comment data exists inside the VML shape that defines the comment object:

<v:shape id="_x0000_s1025" type="#_x0000_t202" style='position:absolute;margin
left:57.75pt;margin-top:9pt;width:77.25pt;height:28.5pt;z-index:1;mso-wrap-
style:tight' fillcolor="#ffffe1" o:insetmode="auto">

<v:fill color2="#ffffe1"/>
<v:shadow on="t" color="black" obscured="t"/>
<v:path o:connecttype="none"/>
<v:textbox style='mso-direction-alt:auto'>
<div style='text-align:left'></div>
</v:textbox>
<x:ClientData ObjectType="Note"> … </x:ClientData>
</v:shape>

end example]